]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
runDialog: Don’t add empty input to history
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Sun, 7 Feb 2021 18:38:40 +0000 (19:38 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 8 Feb 2021 08:14:46 +0000 (08:14 +0000)
If the input is empty, there’s no point in adding it to the history –
it’ll just be mildly annoying when the user has to skip past it next
time they consult the history.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3183.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1442>

js/ui/runDialog.js

index 114aa1b2657ee41d0929ef94533cd8f05e8d56b5..b847f0d11b79ef253b0f193e77c33f241f876b81 100644 (file)
@@ -180,7 +180,8 @@ class RunDialog extends ModalDialog.ModalDialog {
     _run(input, inTerminal) {
         let command = input;
 
-        this._history.addItem(input);
+        if (input)
+            this._history.addItem(input);
         this._commandError = false;
         let f;
         if (this._enableInternalCommands)